cmake_minimum_required(VERSION 3.4.1)

# 设置 JNILIBS_DIR  赋值为jniLibs的路径
set(lib_path_dir ${CMAKE_SOURCE_DIR}/../jniLibs)
#编译过程中代码提示 （配置头文件）
include_directories(include)

#添加预编译FMOD库
#设置详细导入路径
add_library(fmod
        SHARED
        IMPORTED)
set_target_properties(fmod
        PROPERTIES IMPORTED_LOCATION
        ${lib_path_dir}/${ANDROID_ABI}/libfomd.so)

add_library(fmodL
        SHARED
        IMPORTED)
set_target_properties(fmodL
        PROPERTIES IMPORTED_LOCATION
        ${lib_path_dir}/${ANDROID_ABI}/libfomdL.so)

#设置本地动态库，编译生成动态库
add_library( # Sets the name of the library.
        voice-lib #模块名
        # Sets the library as a shared library.
        SHARED #动态库/分享库
        # Provides a relative path to your source file(s).
        voice-bean.cpp) #源文件

#查找系统库，日志输出（系统log库）
find_library( # Sets the name of the path variable.
        log-lib
        # Specifies the name of the NDK library that
        # you want CMake to locate.
        log)

#需要链接或者编译的库
target_link_libraries( # Specifies the target library.
        voice-lib
        fmod
        fmodL
        # Links the target library to the log library
        # included in the NDK.
        ${log-lib})